<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="https://cdn.jsdelivr.net/npm/echarts@5.5.1/dist/echarts.min.js"></script>
</head>
<body>
<div id="main" style="width: 600px;height:400px;"></div>
<script type="text/javascript">
    var myChart = echarts.init(document.getElementById('main'));
    var app = {};
    let option;

    // var chartDom = document.getElementById('main');


    option = {
        xAxis: {
            data: ['A', 'B', 'C', 'D', 'E']
        },
        yAxis: {},
        series: [
            {
                data: [10, 22, 28, 43, 49],
                type: 'bar',
                stack: '男',

            },
            {
                data: [5, 4, 3, 5, 10],
                type: 'bar',
                stack: '男'
            },
            {
                data: [10, 22, 28, 43, 49],
                type: 'bar',
                stack: '女'
            },
            {
                data: [5, 4, 3, 5, 10],
                type: 'bar',
                stack: '女'
            }
        ]
    };


    option && myChart.setOption(option);

</script>
</body>
</html>
